public class Cat {
    private String name;
    private int weight;
    private int physical;
    public Cat(String name,int weight,int physical){
        this.name=name;
        this.weight=weight;
        this.physical=physical;
    }
    public void bite(){
        physical+=20;
        System.out.println(name+"的体力是："+physical+";\n重量是："+weight+"kg。");
    }
    public void defeat(){
        physical-=10;
        System.out.println(name+"的体力是："+physical+";\n重量是："+weight+"kg。");
    }

    public void setPhysical(int physical) {
        this.physical = physical;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName(){
        return name;
    }

    public int getWeight() {
        return weight;
    }

    public int getPhysical() {
        return physical;
    }
}
